Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
AssemblyScript library to generate RFC-compliant UUIDs v4 (random) 🚀
npm install --save as-uuid
Generate a random UUID string:
import uuid from "as-uuid";
const id: string = uuid();
id; // "0f5abcd1-c194-47f3-905b-2df7263a084b"
The library use Math.random
by default to generate random numbers.
This requires a seed for the random number generator to be imported from the host:
WebAssembly.instantiateStreaming(fetch('my.wasm'), {
env: {
seed: Date.now,
// ...
}
});
Notice that the seed is provided automatically when the loader is used or when WASI is imported.
More details at https://www.assemblyscript.org/stdlib/math.html#using-nativemath
Alternatively, WASI can be used to import the random number generator:
import uuid from "as-uuid/uuid-wasi";
const id: string = uuid();
id; // "0f5abcd1-c194-47f3-905b-2df7263a084b"
WebAssembly.instantiateStreaming(fetch('my.wasm'), {
wasi_snapshot_preview1: // ...
});
The assembly
directory contains AS source code.
npm i
npm run asbuild
The assembly/__tests__
directory contains all unit tests.
npm test
npm run test:wasi
FAQs
AssemblyScript library to generate RFC-compliant UUIDs v4 (random)
The npm package as-uuid receives a total of 39 weekly downloads. As such, as-uuid popularity was classified as not popular.
We found that as-uuid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.